<?php
class Application_Model_DbTable_Demand extends Zend_Db_Table_Abstract{
	protected $_name = 'demande_qcm';
	protected $_primary =  array('id_qcm','device_uuid');
	
	public function getDemand($qcm,$device){
		$select = $this->select();
		$select->setIntegrityCheck(false);
		
		$select	->from(array('d'=>$this->_name))
				->where('d.id_qcm = ?',$qcm)
				->where('d.device_uuid = ?',$device);
		return $select->query()->fetch(PDO::FETCH_OBJ);
	}
}